package com.plian.system.entity.lg;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.plian.Tools.DateUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.List;

/**
 * <p>
 * 法律纠纷案件跟踪
 * </p>
 *
 * @author hu song
 * @since 2023-01-31
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("lg_law_dispute_case_tracing")
@ApiModel(value="LawDisputeCaseTracing对象", description="法律纠纷案件跟踪")
public class LawDisputeCaseTracing implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @ApiModelProperty(value = "案件状态 151001:已立案;151002:审批中;151003:已结案;151004:其他")
    @NotEmpty
    private String caseStatus;

    @ApiModelProperty(value = "进度详情")
    @NotNull
    private String progressDetails;

    @ApiModelProperty(value = "法律纠纷id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long lawDisputeId;

    @ApiModelProperty(value = "上报时间")
    @DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
    @JsonFormat(pattern = DateUtil.PATTERN_DATE, timezone = "Asia/Shanghai")
    private Date reportingTime;

    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
    @JsonFormat(pattern = DateUtil.PATTERN_DATETIME, timezone = "Asia/Shanghai")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
    @JsonFormat(pattern = DateUtil.PATTERN_DATETIME, timezone = "Asia/Shanghai")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @TableField(exist = false)
    @ApiModelProperty(value = "附件")
    private List<HashMap> docList;
}
